Frojas+tgregory/upgrade misk to jetty 12 - #3847
Open
tgregory-block wants to merge 9 commits into
Open
Conversation
Add a mechanism for getting a HttpCall's HTTP version. Update query param encoding test Fix rebase Appease projectHealth check Make SocketAddress from method internal Fix port conflict Fix JettyHealthService Switch to UriCompliance.LEGACY Fix tests Fix Http2ConnectivityTest fix JettyServletUpstreamResponse fix JettyService fix imports first pass upgrading deps and updating code
# Conflicts: # gradle/libs.versions.toml # misk/src/main/kotlin/misk/web/HttpCall.kt # misk/src/main/kotlin/misk/web/ServletHttpCall.kt # misk/src/main/kotlin/misk/web/jetty/JettyHealthService.kt # misk/src/main/kotlin/misk/web/jetty/JettyService.kt # misk/src/main/kotlin/misk/web/jetty/JettyServletUpstreamResponse.kt # misk/src/main/kotlin/misk/web/jetty/JettyWebSocket.kt # misk/src/main/kotlin/misk/web/jetty/WebActionsServlet.kt # misk/src/test/kotlin/misk/web/interceptors/RequestDeadlineInterceptorTest.kt # misk/src/test/kotlin/misk/web/jetty/WebActionsServletTest.kt
# Conflicts: # gradle/libs.versions.toml # misk/src/main/kotlin/misk/web/HttpCall.kt
tgregory-block
force-pushed
the
frojas+tgregory/upgrade-misk-to-jetty-12
branch
from
June 18, 2026 16:45
8bede42 to
bf2d1a9
Compare
tgregory-block
marked this pull request as ready for review
June 18, 2026 17:33
frojasg
approved these changes
Jun 18, 2026
Jetty 12 derives the request's server authority from the connection's
local address when a request carries no Host/:authority
(ConnectionMetaData.getServerAuthority falls back to
getLocalSocketAddress). For a Unix domain socket that address is the
socket file path (e.g. /etc/sockets/istio-proxy.sock), which HostPort
rejects as an invalid authority: it logs "Bad Authority: [...]" and
throws, failing the request with a 400.
This bites authority-less requests such as the HTTP/2 prior-knowledge
preface ("PRI * HTTP/2.0"), which HttpStreamOverHTTP1 resolves before
the h2c upgrade -- and h2c defaults to true for UDS sockets. It also
bites any HTTP/1.0 request without a Host header. The failure happens
while building the request URI, before request customizers run, so
HostHeaderCustomizer cannot fix it; setting the fallback authority on
HttpConfiguration is the supported knob.
Set serverAuthority on a copy of the shared HttpConfiguration, scoped to
the Unix-domain connectors, so TCP connectors keep deriving their
authority from the (perfectly valid) local host:port. Requests that do
carry a Host/:authority continue to use their own value.
This mirrors the equivalent fix in Cash's service-container connector
factories and JSC's GenericServerConfigurator.
@MiskTest(startService = true) already starts the service; the field was never read.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
misk needs to be on a supported Jetty version
Testing Strategy
Existing test suite. The only test modifications made were for functionality that has changed or been removed in Jetty 12, e.g. MultiException was removed.
Checklist
Thank you for contributing to Misk! 🎉